<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link href="/static/mobile/login/css/login.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/static/mobile/login/js/jquery.min.js"></script>

</head>
<body>



<section class="aui-flexView">
    <center>
        <div id="login_msg" style="color:red;"></div>
    </center>
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:;" class="aui-navBar-item" onclick="javascript:history.back(-1);">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">注册</span>
        </div>
        <a href="login.html" class="aui-navBar-item">
            <i class="icon icon-sys"></i>登录
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-code-box">
            <form action="">

                <p class="aui-code-line">
                    <input type="text" class="aui-code-line-input" name="mobile" value="" id="mobile" autocomplete="off" placeholder="请输入手机号"/>
                </p>

                <p class="aui-code-line">
                    <input type="password" id="password" class="aui-code-line-input" placeholder="请输入密码" value="">
                </p>
                <p class="aui-code-line">
                    <!-- <i class="aui-show  operate-eye-open"></i> -->
                    <input type="password" id="re_password" class="aui-code-line-input" placeholder="再次验证密码" value="">
                </p>

                <div class="aui-code-btn">

                    <p style="margin: 0 0 0.625rem 0;font-size: 0.8125rem;">点击 [ 注册 ] 按钮即代表同意<a href="http://www.hlrork.com/index/register/agreement" class="agree">《用户服务协议》</a></p>

                    <button type="button" id="register">注册</button>
                </div>
            </form>
        </div>

    </section>
</section>

<script type="text/javascript" src="/static/mobile/login/js/register.js"></script>
<script>
    $('input[name="mobile"]').click(function(){
        $("#login_msg").html('');
    });
    $('input[name="password"]').click(function(){
        $("#login_msg").html('');
    });
    $("#register").click(function(){
       var mobile = $('#mobile').val();
       var password = $('#password').val();
       var re_password = $('#re_password').val();
        $.post('/mobile/login/executeRegister',{mobile:mobile,password:password,re_password:re_password},function(data){
            if(data.state != 200){
                $("#login_msg").html(data.msg);
            }else{
                $("#register").html('请先登陆...');
                window.location.replace('/mobile/login/login')
            }
        });
    })
</script>

</body>
</html>
